#include "knl_asynLogger.h"
#include "thread/knl_threadManager.h"
#include "logger_thread/knl_LoggerRunnable.h"

namespace knl
{
	knl_asynLogger::knl_asynLogger(void)
	{

	}


	knl_asynLogger::~knl_asynLogger(void)
	{
	}

	void knl_asynLogger::startLogger( knl_LoggerConfig* _config )
	{
		knl_threadRunnablePtr _runnable( new knl_LoggerRunnable() );
		_runnable->setLoop(true);
		((knl_LoggerRunnable*)(_runnable.get()))->setloggerConfig(_config);
		knl_add_threadJob(_runnable);
	}

	knl_loggerQueue* knl_asynLogger::Logger()
	{
		return &_loggerQueue;
	}

}